package com.v5.ik;

import android.app.Application;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.Volley;

/**
 * Created by zy on 2016/7/7.
 */
public class MyApp extends Application {
    private static MyApp myApp;
    private ImageLoader imageLoader;
    private RequestQueue requestQueue;
    private MainActivity mainActivity;

    @Override
    public void onCreate() {
        super.onCreate();
        myApp = this;

        requestQueue = Volley.newRequestQueue(this);
        imageLoader = new ImageLoader(requestQueue, new LruBitmapCache(this));
    }

    public static MyApp getMyApp() {
        return myApp;
    }

    public RequestQueue getRequestQueue() {
        return requestQueue;
    }

    public ImageLoader getImageLoader() {
        return imageLoader;
    }

    public MainActivity getMainActivity() {
        return mainActivity;
    }

    public void setMainActivity(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
    }
}
